package com.zhuss.timer;

import java.time.LocalDateTime;
import java.util.concurrent.TimeUnit;

import com.zhuss.util.PwdUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author: Liangjiawei
 * @Date: 2020/3/31 21:49
 */
@Component
@Configuration
@EnableScheduling
public class QuestionTimeTask {


    @Scheduled(cron = "1 1 1 * * ?")
    private void configureTasks() {
        System.err.println("执行静态定时任务时间: " + LocalDateTime.now());
    }

    public static void main(String[] args) throws InterruptedException {
        System.out.println(PwdUtil.pwd("123456"));
        TimeUnit.MICROSECONDS.sleep(10000);
        // e10adc3949ba59abbe56e057f20f883e
    }
}
